package com.bailv.util;

import java.security.KeyStore.PrivateKeyEntry;

import com.bailv.smartdormitory.R;

import android.content.Context;
import android.os.Handler;
import android.os.Message;

public class RFIDThread extends Thread {
	
	private String[] rifdNum = new String[2];
	
	private String RFIDNumber;
	private Handler handler;
	private Context context;
	
	public RFIDThread(Context context,String RFIDNumber,Handler handler){
		this.RFIDNumber = RFIDNumber;
		this.handler = handler;
		this.context = context;
		rifdNum[0] = "83AD6700";
		rifdNum[1] = "446AEA6E";
	}
	
	private boolean RFIDVerify(){
		boolean isVerify = false;
		return isVerify;
	}
	
	@Override
	public void run() {
		// TODO Auto-generated method stub
		
		for(int i=0;i<rifdNum.length;i++){
			if (RFIDNumber.equals(rifdNum[i])) {
				if (i==0) {
					Message msg = new Message();
					msg.what = 0;
					handler.sendMessage(msg);
				}else if (i == 1) {
					Message msg = new Message();
					msg.what = 1;
					handler.sendMessage(msg);
				}
				
				break;
			}
		}
	}
	
}
